// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import Vuex from 'vuex';
import App from './App';
import router from './router';
import VueResource from 'vue-resource';
import global from './assets/js/global.js';
import utils from './assets/js/utils.js';
import storage from './assets/js/storage.js';
import profile from './assets/js/pro.js';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/js/bootstrap.min.js';
import 'babel-polyfill';
import './assets/css/my-mint.css';

Vue.use(Vuex);
Vue.use(VueResource);
Vue.prototype.$global = global;
Vue.prototype.$utils = utils;
Vue.prototype.$storage = storage;
Vue.prototype.$baseService = profile;
Vue.config.productionTip = false;

/*
设置请求头信息
 */
// Vue.http.interceptors.push((request, next) => {
//   let userData = Vue.prototype.$storage.getStorage('userData');
//   if (userData) {
//     request.headers.set('mobile', userData.mobile);
//   }
//   request.headers.set('mobile', '18654930256');
//   next((response) => {
//     return response;
//   });
// });

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
});
